$def with (privData)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
$:privData['render'].header(privData)
<script language="javascript" src="http://webapi.amap.com/maps?v=1.2&key=f1c10ccd66938f3facb624a3f388c022"></script> 
<body>
$:privData['render'].pageheader(privData)

<h2>编辑产品</h2>
<form action="$makeUrl('/user/product/update')" method="post">
    <table width="750" border="0" cellspacing="0" cellpadding="1" class="addtable">
        <tr>
            <td width="100" scope="col">产品类别:</td>
            <td width="608" scope="col">
                <SELECT  name="category" id="category">
                    $for k, v in privData['CATEGORY_LIST'].items():
                    <option value="$:k"
                    $if k == privData['PRODUCT']['category']::
                        selected="selected"
                    >$:v</option>
                </SELECT>
            </td>
        </tr>
        <tr>
            <td width="100" scope="col">图片:</td>
            <td width="608" scope="col">
                $:privData['render'].thumbnail_select_widget(privData)
            </td>
        </tr>
        <tr>
            <td width="100" scope="col">名称:</td>
            <td width="608" scope="col"><input name="name" type="text" value="$:privData['PRODUCT']['name']"/></td>
        </tr>
        <tr>
            <td width="100" scope="col">价格:</td>
            <td width="608" scope="col"><input name="price" type="text" value="$:privData['PRODUCT']['price']"/></td>
        </tr>
        <tr>
            <td width="100" scope="col">折扣:</td>
            <td width="608" scope="col"><input name="discount" type="text" value="$:privData['PRODUCT']['discount']"/></td>
        </tr>
        <tr>
            <td width="100" scope="col">推荐指数:</td>
            <td width="608" scope="col"><input name="rank" type="text" value="$:privData['PRODUCT']['rank']"/></td>
        </tr>

        <tr>
            <td width="100" scope="col">公司:</td>
            <td width="608" scope="col">
                <SELECT  name="company" id="company">
                    $for kc, vc in privData['COMPANY_LIST'].items():
                    <option value="$:kc"
                    $if kc == privData['PRODUCT']['company']:
                        selected="selected"
                    >$:vc</option>
                </SELECT>
            </td>
        </tr>
        <tr>
            <td width="100" scope="col">地区:</td>
            <td width="608" scope="col"><input name="region" type="text" value="$:privData['PRODUCT']['region']"/></td>
            </td>
        </tr>
        <tr>
            <td colspan="2" scope="col">
            $:privData['render'].map_select_widget(privData)
            </td>
        </tr>
        <tr>
            <td width="100" scope="col">经度:</td>
            <td width="608" scope="col"><input name="longitude" type="text" value="$:privData['PRODUCT']['longitude']" /></td>
        </tr>
        <tr>
            <td width="100" scope="col">纬度:</td>
            <td width="608" scope="col"><input name="latitude" type="text" value="$:privData['PRODUCT']['latitude']" /></td>
        </tr>
        <tr>
            <td width="100" scope="col">联系人:</td>
            <td width="608" scope="col"><input name="contact" type="text" value="$:privData['PRODUCT']['contact']" /></td>
            </td>
        </tr>

        <tr>
            <td width="100" scope="col">电话:</td>
            <td width="608" scope="col"><input name="telephone" type="text" value="$:privData['PRODUCT']['telephone']" /></td>
            </td>
        </tr>

        <tr>
            <td width="100" scope="col">邮件地址:</td>
            <td width="608" scope="col"><input name="email" type="text" value="$:privData['PRODUCT']['email']" /></td>
            </td>
        </tr>
        <tr>
            <td width="100" scope="col">描述:</td>
            <td colspan="1" scope="col">
                $:privData['render'].album_insert_widget(privData)
                <textarea rows="10" cols="5" name="desc" id="desc">$:privData['PRODUCT']['desc']</textarea></td>

                <script type="text/javascript" src="$makeUrl('/static/editor/tinyeditor.js')"></script>
                <link rel="stylesheet" href="$makeUrl('/static/editor/style.css')" />
                <script type="text/javascript">
                    var instance=new TINY.editor.edit('editor',{
                        id:'desc',
                        width:654,
                        height:175,
                        cssclass:'contentls',
                        controlclass:'tecontrol',
                        rowclass:'teheader',
                        dividerclass:'tedivider',
                        controls:['bold','italic','underline','strikethrough','|','subscript','superscript','|', 'orderedlist','unorderedlist','|','outdent','indent','|','leftalign',
                            'centeralign','rightalign','blockjustify','|','unformat','|','undo','redo','print','n',
                            'font','size','style','forecolor','backcolor','|','image','swf','media','upload','|','hr','link','unlink','|','cut','copy','paste'],
                        footer:true,
                        fonts:['楷体','宋体','黑体','Verdana','Arial','Georgia'],
                        xhtml:true,
                        uploadexc:"$makeUrl('/admin/upload')",
                        bodyid:'editor',
                        footerclass:'tefooter',
                        toggle:{text:'源码',activetext:'视图',cssclass:'toggle'},
                        resize:{cssclass:'resize'}
                    });
                    var _j = jQuery.noConflict();
                    _j("#insert_img_album").change(function(){
                        var sel_category = _j(this).val();
                        _j("#insert_thumbnail_list").children("div").addClass("hidden").filter("#insert_thumbnail_list_"+sel_category).removeClass("hidden");
                    });
                    _j("#toggle_select_thumbnail").click(function(){
                        _j("#insert_thumbnail_list").toggle();
                    });
                    _j("#insert_select_thumbnail").click(function(){
                        window._tmp_edit_obj.execCommand("insertimage", 0, _j(":radio[name='insert_thumbnail_raido']:checked").val());
                        _j("#insert_thumbnail_list").hide();
                    });
                </script>
        </tr> 
        <tr><td colspan="2" scope="col">
            <input name="id" type="hidden" value="$:privData['PRODUCT']['id']"/>
            <input type="submit" name="submit" value="保存" id="submits" onmouseover="instance.post();" />
        </td></tr>
    </table>     
</form>
</body></html>

